import {Store} from "pinia";
import {cloneDeep} from "@/utils/common-fn";

export default function resetStore({store}: { store: Store }) {
    const initialState = cloneDeep(store.$state)
    store.$reset = () => store.$patch(cloneDeep(initialState))
}